package happy.town.case_JdbcUtils;

import java.sql.Connection;


public class TestThreadLocal2 {
    public static void main(String[] args) throws Exception {
        Connection conn1 = JdbcUtils03.getconnection();
        Connection conn2 = JdbcUtils03.getconnection();
        System.out.println("conn1:" + conn1);
        System.out.println("conn2:" + conn2);
        Thread t1 = new Thread() {
            public void run() {
                try {
                    Connection conn3 = JdbcUtils03.getconnection();
                    System.out.println("conn3:" + conn3);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        };
        t1.start();
    }
}
